package com.cloudpivot.receivales.invoice.repository;


import com.cloudpivot.receivales.crm.entity.contract.ContractEntity;
import com.cloudpivot.receivales.invoice.entity.InvoiceStatusEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface InvoiceRepository extends JpaRepository<InvoiceStatusEntity, String> {

    @Query(nativeQuery = true, value = "select formtable_main_15.REQUESTID as flowIdOA,fapiaobh as invoiceNum,STATUS as invoiceResult from formtable_main_15 left join WORKFLOW_REQUESTBASE on formtable_main_15.REQUESTID = WORKFLOW_REQUESTBASE.REQUESTID where formtable_main_15.REQUESTID=?1")
    InvoiceStatusEntity getInvoiceList(String flowIdOA);
}
